﻿using System;
using System.IO;
using System.Net;
using System.Collections.Generic;
using System.Threading.Tasks;
using NFinal;

//此代码由NFinalCompiler生成。
//http://bbs.nfinal.com
namespace $safeprojectname$.Views.Index
{
    /// <summary>
    /// 模板类
    /// </summary>
    [View("/$safeprojectname$/Views/Index/Index.cshtml")]
    public class Index : NFinal.View.RazorView<$safeprojectname$.Controllers.IndexController_Model.Index>
    {
        /// <summary>
        /// 模板类初始化函数
        /// </summary>
        /// <param name="writer">写对象</param>
        /// <param name="Model">数据</param>
        public Index(NFinal.IO.Writer writer, $safeprojectname$.Controllers.IndexController_Model.Index Model) : base(writer, Model)
        {
        }
        /// <summary>
        /// 输出模板内容
        /// </summary>
        public override void Execute()
        {
            this.ExecuteAsync().Wait();
        }
        /// <summary>
        /// 输出模板内容(异步)
        /// </summary>
        public override async Task ExecuteAsync()
        {
            await writer.WriteAsync("");
            await writer.WriteAsync("<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <meta charset=\"utf-8\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n    <title>");
            await writer.WriteAsync(Model.Title);
            await writer.WriteAsync("</title>\r\n    ");
            await writer.WriteAsync(this.Render<string>("/$safeprojectname$/Views/Shared/HeadContent.cshtml", null));
            await writer.WriteAsync("\r\n</head>\r\n<body>\r\n    ");
            await writer.WriteAsync(this.Render<string>("/$safeprojectname$/Views/Shared/NavContent.cshtml", null));
            await writer.WriteAsync("\r\n    <div class=\"container body-content\">\r\n        <div id=\"myCarousel\" class=\"carousel slide\" data-ride=\"carousel\" data-interval=\"6000\">\r\n            <ol class=\"carousel-indicators\">\r\n                <li data-target=\"#myCarousel\" data-slide-to=\"0\" class=\"active\"></li>\r\n                <li data-target=\"#myCarousel\" data-slide-to=\"1\"></li>\r\n                <li data-target=\"#myCarousel\" data-slide-to=\"2\"></li>\r\n                <li data-target=\"#myCarousel\" data-slide-to=\"3\"></li>\r\n            </ol>\r\n            <div class=\"carousel-inner\" role=\"listbox\">\r\n                <div class=\"item active\">\r\n                    <img src=\"/Content/images/banner1.svg\" alt=\"NFinal MVC\" class=\"img-responsive\" />\r\n                    <div class=\"carousel-caption\" role=\"option\">\r\n                        <p>\r\n                            学习如何建立可以运行在任何地方的NFinal Web应用程序\r\n                            <a class=\"btn btn-default\" href=\"http://chm.nfinal.com\">\r\n                                了解更多\r\n                            </a>\r\n                        </p>\r\n                    </div>\r\n                </div>\r\n                <div class=\"item\">\r\n                    <img src=\"/Content/images/banner2.svg\" alt=\"NFinal Compiler\" class=\"img-responsive\" />\r\n                    <div class=\"carousel-caption\" role=\"option\">\r\n                        <p>\r\n                            这里有很多的Visual Studio插件，可以帮助开发者自动生成各种模型。\r\n                            <a class=\"btn btn-default\" href=\"http://chm.nfinal.com\">\r\n                                了解更多\r\n                            </a>\r\n                        </p>\r\n                    </div>\r\n                </div>\r\n                <div class=\"item\">\r\n                    <img src=\"/Content/images/banner3.svg\" alt=\"插件管理\" class=\"img-responsive\" />\r\n                    <div class=\"carousel-caption\" role=\"option\">\r\n                        <p>\r\n                            粘贴复制文件就可以完成我们的站点设置，是一件多么轻松的事。\r\n                            <a class=\"btn btn-default\" href=\"http://chm.nfinal.com\">\r\n                                了解更多\r\n                            </a>\r\n                        </p>\r\n                    </div>\r\n                </div>\r\n                <div class=\"item\">\r\n                    <img src=\"/Content/images/banner4.svg\" alt=\"云应用\" class=\"img-responsive\" />\r\n                    <div class=\"carousel-caption\" role=\"option\">\r\n                        <p>\r\n                            利用阿里云服务建立适合中小型企业的网站应用。\r\n                            <a class=\"btn btn-default\" href=\"http://chm.nfinal.com\">\r\n                                了解更多\r\n                            </a>\r\n                        </p>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n            <a class=\"left carousel-control\" href=\"#myCarousel\" role=\"button\" data-slide=\"prev\">\r\n                <span class=\"glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span>\r\n                <span class=\"sr-only\">Previous</span>\r\n            </a>\r\n            <a class=\"right carousel-control\" href=\"#myCarousel\" role=\"button\" data-slide=\"next\">\r\n                <span class=\"glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span>\r\n                <span class=\"sr-only\">Next</span>\r\n            </a>\r\n        </div>\r\n\r\n        <div class=\"row\">\r\n            <div class=\"col-md-3\">\r\n                <h2>该应用用于</h2>\r\n                <ul>\r\n                    <li>NFinal MVC站点案例</li>\r\n                    <li><a href=\"http://chm.nfinal.com\">浏览</a>NFinal MVC 帮助文档</li>\r\n                    <li>前端使用<a href=\"http://v3.bootcss.com/\">Bootstrap</a></li>\r\n                </ul>\r\n            </div>\r\n            <div class=\"col-md-3\">\r\n                <h2>如何做？</h2>\r\n                <ul>\r\n                    <li><a href=\"http://chm.nfinal.com\">添加新的控制器和模板</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">如何输出页面</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">如何获取参数及上传文件</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">如何生成Url</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">如何操作数据库</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">如何调试</a></li>\r\n                </ul>\r\n            </div>\r\n            <div class=\"col-md-3\">\r\n                <h2>简介</h2>\r\n                <ul>\r\n                    <li><a href=\"http://chm.nfinal.com\">NFinal简单介绍</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">宿主项目与插件项目</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">建立宿主项目</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">建立插件项目</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">自定义用户控件</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">自定义组件</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">全局配置及插件配置</a></li>\r\n                </ul>\r\n            </div>\r\n            <div class=\"col-md-3\">\r\n                <h2>运行 &amp; 发布</h2>\r\n                <ul>\r\n                    <li><a href=\"http://chm.nfinal.com\">运行你的Web应用程序</a></li>\r\n                    <li><a href=\"\">利用CEF创建桌面应用程序</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">使用Kerstel跨平台运行</a></li>\r\n                    <li><a href=\"http://chm.nfinal.com\">如何发布到IIS上</a></li>\r\n                </ul>\r\n            </div>\r\n        </div>\r\n        <hr />\r\n        <footer>\r\n            <p>&copy; 2017 - NFinal</p>\r\n        </footer>\r\n    </div>\r\n</body>\r\n</html>\r\n");
        }
    }
}
